package com.cpx.mapper;

import com.cpx.BaseMapper;
import com.cpx.po.Employee;
import com.cpx.po.Permission;
import com.cpx.po.Role;

import java.util.List;

public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * @Author: PanBin
     * @Description: 员工名称查询员工
     * @CreateDate: 2018-11-13 11:47
     * @Param [username]
     * @Return com.cpx.po.Employee
     */
    Employee findEmployeeByUsername(String username);

    /**
     * @Author: PanBin
     * @Description: 通过员工id获取所有权限
     * @CreateDate: 2018-11-13 11:48
     * @Param [id]
     * @Return java.util.List<com.cpx.po.Permission>
     */
    List<Permission> getPermissionListByEmployeeId(Integer id);

    /**
     * @Author: PanBin
     * @Description: 通过员工id获取所有角色
     * @CreateDate: 2018-11-13 11:49
     * @Param [id]
     * @Return java.util.List<com.cpx.po.Role>
     */
    List<Role> getRoleListByEmployeeId(Integer id);
}